import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;

public class Even {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        List<Integer> numbers = new ArrayList<>();

        System.out.println("请输入多个整数：");

        String line;
        while (true) {
            line = scanner.nextLine().trim();
            if (line.isEmpty()) {
                break;
            }

            String[] parts = line.split("\\s+");
            for (String part : parts) {
                try {
                    numbers.add(Integer.parseInt(part));
                } catch (NumberFormatException e){
                    System.out.println("以下数据无效："+part);
                }
            }
        }

        scanner.close();

        if (numbers.isEmpty()) {
            System.out.println("无数字");
            return;
        }

        System.out.println("输入的偶数有：");
        for (int num : numbers) {
            if (num % 2 == 0) {
                System.out.print(num + " ");
            }
        }
        System.out.println();
    }
}